#include <jni.h>

#include <android/log.h>


extern "C" {
#include "libavutil/avutil.h"
}

#define TAG "video_native"
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,TAG,__VA_ARGS__)
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,TAG,__VA_ARGS__)
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN,TAG,__VA_ARGS__)
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,TAG,__VA_ARGS__)
#define ALOG(level, ...) __android_log_print(level,TAG,__VA_ARGS__)

extern "C"
JNIEXPORT void JNICALL
Java_com_zgkxzx_videosdk_NativeApi_hello(JNIEnv *env, jobject thiz) {
    LOGD("Hello World，ffmpeg for Android!");
    const char *info = av_version_info();
    LOGD("av_version_info info %s", info);
}

extern "C"
JNIEXPORT jint JNICALL
Java_com_zgkxzx_videosdk_NativeApi_cut(JNIEnv *env, jobject thiz, jstring src_path,
                                       jstring dst_path, jint start_time, jint end_time) {
    // TODO: implement cut()
    return 0;
}
extern "C"
JNIEXPORT jint JNICALL
Java_com_zgkxzx_videosdk_NativeApi_clip(JNIEnv *env, jobject thiz, jstring src_path,
                                        jstring dst_path, jint dst_width, jint dst_height) {
    // TODO: implement clip()
    return 0;
}
extern "C"
JNIEXPORT jint JNICALL
Java_com_zgkxzx_videosdk_NativeApi_clip2(JNIEnv *env, jobject thiz, jstring src_path,
                                         jstring dst_path, jint dst_width, jint dst_height) {
    // TODO: implement clip2()
    return 0;
}
extern "C"
JNIEXPORT jint JNICALL
Java_com_zgkxzx_videosdk_NativeApi_clip3(JNIEnv *env, jobject thiz, jstring src_path,
                                         jstring dst_path, jint dst_width, jint dst_height) {
    // TODO: implement clip3()
    return 0;
}